package com.oceanread.cn.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oceanread.cn.entity.Treelist1;
import com.oceanread.cn.entity.Treelist2;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface Treelist2Mapper extends BaseMapper<Treelist2> {
    List<Treelist2> getall();

    List<Treelist2> query(@Param("key") String key, @Param("value") String value);
    List<Treelist2> equal(@Param("key") String key, @Param("value") String value);
    List<Treelist2> getTablelist(@Param("start") int start, @Param("end") int end);

    List<Treelist2> getTablelistquery(@Param("key") String key, @Param("value") String value, @Param("start") int start,
                                      @Param("end") int end);

    Integer getnum();

    Integer getnumquery(@Param("key") String key, @Param("value") String value);

    Integer update(@Param("SYSID") int SYSID,
                   @Param("pId") String pId,
                   @Param("id") String id,
                   @Param("Name") String Name,
                   @Param("path") String path,
                   @Param("type") String type,
                   @Param("typeroot") String typeroot,
                   @Param("layers") String layers,
                   @Param("open") Boolean open,
                   @Param("enablePickFeatures") Boolean enablePickFeatures,
                   @Param("influencechild") Boolean influencechild,
                   @Param("checked") Boolean checked,
                   @Param("Lon") Double Lon,
                   @Param("Lat") Double Lat,
                   @Param("Height") Double Height,
                   @Param("heading") Double heading,
                   @Param("pitch") Double pitch,
                   @Param("roll") Double roll
    );

    @SqlParser(filter = true)
    Integer insert(
            @Param("pId") String pId,
            @Param("id") String id,
            @Param("Name") String Name,
            @Param("path") String path,
            @Param("type") String type,
            @Param("typeroot") String typeroot,
            @Param("layers") String layers,
            @Param("open") Boolean open,
            @Param("enablePickFeatures") Boolean enablePickFeatures,
            @Param("influencechild") Boolean influencechild,
            @Param("checked") Boolean checked,
            @Param("Lon") Double Lon,
            @Param("Lat") Double Lat,
            @Param("Height") Double Height,
            @Param("heading") Double heading,
            @Param("pitch") Double pitch,
            @Param("roll") Double roll
    );

    Integer delete(@Param("SYSID") int SYSID);

}
